package comone.javafour;

public class Cat extends Pet {
    @Override
    public void eat() {
        if(this.getHealth()>=100){
            System.out.println("宠物的身体挺好..");
        }else {
            System.out.println("吃鱼，");
            this.setHealth(100);
            System.out.println("健康值已经恢复");
        }

    }

    public void yy(){
        System.out.println("游泳....");
    }
}
